package com.company;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class HJ9 {
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        String input=in.nextLine();
        Set<Character> s=new HashSet<>();
        for(int i=input.length()-1;i>=0;i--){
            if(!s.contains(input.charAt(i))){
                s.add(input.charAt(i));
                System.out.print(input.charAt(i));
            }
        }
    }
}
